<template>
  <div>
    <div class="imgAndText">
      <img v-if="scope.row.avatarUrl && scope.row.avatarUrl.length" class="img" :src="scope.row.avatarUrl">
      <template v-else>
        <img v-if="scope.row.sex === 1" src="@/assets/default-man.png" class="img">
        <img v-else-if="scope.row.sex === 2" src="@/assets/default-woman.png" class="img">
        <img v-else src="@/assets/default-avatar.png" class="img">
      </template>
      <div class="info">
        <div class="top">{{ scope.row.name }}</div>
        <div class="bottom">{{ scope.row.identityCard }}</div>
      </div>
    </div>
  </div>
</template>

<script>
</script>

<style lang="scss" scoped>
.imgAndText{
  display: flex;
  align-items: center;
  .img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin-right: 16px;
  }
  .info {
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    color: #333;
    .top{
      font-weight: bold;
      margin: 2px 0;
    }
  }
}
</style>

